package com.ljs.view.map
{
	import com.ljs.control.MainContent;
	import com.ljs.define.MapTypeDefine;
	import com.ljs.view.map.Map1;
	import flash.display.MovieClip;

	public class Map extends MovieClip
	{
		private var _datapool:MainContent;
		private var _mc:MovieClip;
		public function Map()
		{
			
		}
		
		public function setContent(c:MainContent)
		{
			_datapool=c;
		}
		
		public function create()
		{
			destroy();
			switch(_datapool.worldVo.worldId)
			{
				case MapTypeDefine.MAP_1:
					_mc=new Map1();
					break;
				default:
					_mc=new Map1();
					break;
			}
			addChild(_mc);
		}
		
		public function destroy()
		{
			if(_mc&&this.contains(_mc))
			{
				removeChild(_mc);
				_mc=null;
			}
		}
	}
}